<!DOCTYPE html>
<html>
<head>
    <title>Array Type Example 9</title>
    <script type="text/javascript">
        var colors = new Array();                      //create an array
        var count = colors.push("red", "green");       //push two items
        alert(count);  //2
        
        count = colors.push("black");                  //push another item on
        alert(count);  //3
        
        var item = colors.pop();                       //get the last item
        alert(item);   //"black"
        alert(colors.length);  //2
    </script>
</head>
<body>

</body>
</html>